/*    */ package dm.sql;
/*    */ 
/*    */ import dm.jdbc.driver.DmdbCallableStatement_bs;
/*    */ import dm.jdbc.driver.DmdbConnection_bs;
/*    */ import java.sql.SQLException;
/*    */ 
/*    */ 
/*    */ public class SQLName
/*    */ {
/* 10 */   String m_name = "";
/*    */   
/* 12 */   String m_pkgName = "";
/* 13 */   String m_schName = "";
/* 14 */   String m_fulName = "";
/*    */   
/*    */ 
/* 17 */   int m_schId = -1;
/* 18 */   int m_packId = -1;
/*    */   
/* 20 */   DmdbConnection_bs m_conn = null;
/*    */   
/*    */   SQLName(String fulName) {
/* 23 */     this.m_fulName = fulName;
/*    */   }
/*    */   
/*    */   public SQLName(DmdbConnection_bs conn) {
/* 27 */     this.m_conn = conn;
/*    */   }
/*    */   
/*    */   String getFulName() throws SQLException
/*    */   {
/* 32 */     if (this.m_fulName.length() > 0) {
/* 33 */       return this.m_fulName;
/*    */     }
/*    */     
/* 36 */     if ((this.m_name == null) || (this.m_name.length() <= 0))
/*    */     {
/* 38 */       return null;
/*    */     }
/*    */     
/*    */ 
/* 42 */     DmdbCallableStatement_bs cstmt = (DmdbCallableStatement_bs)this.m_conn
/* 43 */       .prepareCall("SELECT NAME INTO ? FROM SYS.SYSOBJECTS WHERE ID=?");
/*    */     
/*    */ 
/* 46 */     if (this.m_packId != 0) {
/* 47 */       cstmt.setInt(2, this.m_packId);
/* 48 */       cstmt.registerOutParameter(1, 12);
/* 49 */       cstmt.execute();
/*    */       
/*    */ 
/* 52 */       this.m_pkgName = cstmt.getString(1);
/* 53 */       this.m_fulName = (this.m_pkgName + "." + this.m_name);
/*    */ 
/*    */ 
/*    */     }
/* 57 */     else if (this.m_schId != 0) {
/* 58 */       cstmt.setInt(2, this.m_schId);
/* 59 */       cstmt.registerOutParameter(1, 12);
/* 60 */       cstmt.execute();
/*    */       
/*    */ 
/* 63 */       this.m_schName = cstmt.getString(1);
/* 64 */       this.m_fulName = (this.m_schName + "." + this.m_name);
/*    */     }
/*    */     
/*    */ 
/* 68 */     cstmt.close();
/* 69 */     cstmt = null;
/*    */     
/*    */ 
/* 72 */     if (this.m_fulName.length() > 0) {
/* 73 */       return this.m_fulName;
/*    */     }
/* 75 */     return this.m_name;
/*    */   }
/*    */ }


/* Location:              D:\Program Files\DBMS_20150813\jdbc\Dm7JdbcDriver17.jar!\dm\sql\SQLName.class
 * Java compiler version: 2 (46.0)
 * JD-Core Version:       0.7.1
 */